none
SQLReports (local => .rdlc) over Webservice... RRS feed

  • Question

  • Hello all,

     

    We created our own Framework, we have multiple tiers (server and clientside) and we communicate with each side by using a webservice.

    The problem now is that we want to create our sqlreports on the serverside. We are able to load the reportdefinitions on the clientside, passed by the webservice. But if we want data to fill the report, we have to do another call to the serverside.

    Is there a way to construct the report for 100% on the serverside, and pass the report to the clientside via the webservice?

     

    For example:

     

    SERVERSIDE:

    Dim mySqlReport As New LocalReport

    mySqlReport.ReportEmbeddedResource = "LogReport.rdlc"

    mySqlReport.DataSources.Add(New ReportDataSource("ResultDS_SB_Logs", DS.Tables(0)))

    mySqlReport.SetParameters(parameter)

     

    Here we have to find a way to convert this, to pass it to the webservice...

     

     

    CLIENTSIDE:

    a way to load this in our reportviewer... (because reportviewer.localreport is readonly)

     

    Wednesday, September 5, 2007 2:42 PM

Answers

  • Thanks for your reply!

     

    We use the concept of localreport, because this kind of report is free.

    Our company now has a license of Active Reports and we want to replace it.

    We work also with different databases than MS sql.

     

    We want to create our report on the serverside, because we also want to have the possibility to print on the application server. Thats why we want to pass our complete report and be made on the server.

     

    Kind regards.

     

    Marc

    Thursday, September 6, 2007 6:16 AM

All replies

  • * -- I'm not entirely sure why, if the data is server side, you don't use an RDL rather than an RDLC here? (IOW use serverreport rather than localreport)

     

    * -- Assuming you have to use local mode (and I don't know why) I don't know why you said localreport is readonly?

     

    * -- Assuming you have to use local mode for some really odd reason, you can actually provide the data back to the localmode report as an XML datasource, but this seems like a really odd way to do it and possibly present security concerns, passing all that data around.

     

    >L<

     

     

     

     

     

    Wednesday, September 5, 2007 3:51 PM
  • Thanks for your reply!

     

    We use the concept of localreport, because this kind of report is free.

    Our company now has a license of Active Reports and we want to replace it.

    We work also with different databases than MS sql.

     

    We want to create our report on the serverside, because we also want to have the possibility to print on the application server. Thats why we want to pass our complete report and be made on the server.

     

    Kind regards.

     

    Marc

    Thursday, September 6, 2007 6:16 AM
  • Hi Marc,

     

    Sorry for the delay; I have been away.

     

    I think I see what you are saying, you want to run a report on the server but you don't want to use Reporting Services server.  OK.

     

    (Just btw you can use Reporting Services with many other databases than MS Sql as a data source so this should not be an issue for you even if you do decided to use RS.  What you use as reporting datasources is not necessarily connected at all with the host database for Reporting Services.  I just want to clarify this with you, although it is irrelevant if you are saying you don't want *any* instance of SQL Server on the server...)

     

    Now: please explain to me what you mean about .localreport being readonly?

     

    This does not make any sense to me and maybe you won't have the problem you think you do if we clear it up.

     

    Second: if your application server is running the report in local mode, why not just host the reportviewer web form control on that application server?

     

    Third: if your tiers communicate with web services, why not construct a web service call that passes back the report as inline HTML or a PDF, why use the reportviewer control client-side at all?

     

    You have said that you have multiple tiers, this is fine, but you haven't really explained how you partition the functionality between the tiers.  I am throwing out ideas that might, or might not, work for you depending on what you are really trying to do. 

     

    One thing that is not at all clear to me is which tier is supposed to be massaging the data for the report.  As I said earlier, if the client side needs to do that but server side needs to process the report, then the best way to do this IMHO is to massage the data into an XML format that can be consumed as a datasource on the server.  There are a lot of ways to do this but in my mind the easiest way for localmode reports is to massage the data as a dataset on the client, serialize it in your web service call, and deserialize back to a dataset on the server.  I'm not sure you need to do this, because I'm really not sure you want to process the data on the client!  Is the data client-side or server side?

     

    >L<

    Monday, September 10, 2007 3:14 AM
  • Hello Lisa,

     

    Thanks again for the nice reply.

     

    I understand the misunderstanding from my earlier post, let me make things clear by posting this URL:

     

    http://mjtblog.spaces.live.com/blog/cns!C59AD2B3FEE0C39F!196.entry

     

    The post of Chris is exactly the same as what I was trying to explain here...

     

    Kind regards!

     

    Marc

    Monday, September 10, 2007 6:35 AM
  • OK, I'm going to dump Chris' post in here so other people know what you are talking about <s>:

     

    Hi matt,
     
    this article is veryusefull, but I'm having a couple of questions.
     
    In your example, you define your data (the datatable) locally, i.e. in your winforms or webforms app. Next, you'll just get the rport definition from the webservice and continue with generating the report.
    In any normal case, you'll just as well want to get the data from the same webservice as weel, meaning you have two calls to your webservice, which seams to me like a little to much overhead and performance loss.
     
    Isn't it possible to generate the report (with the data included) and send the result over a webservice while using LocalReport (so we don't need a SQL Server Database)? We've being searching for this for several days now, but are not proceeding very well with it....
     
    I'd appreciate your help very much...
     
    Chris
     

    September 05 10:07 AM

     

    Although matt doesn't seem to have answered this question, I will take a stab at it <s>.

     

    Yes, you can avoid two web service calls. Here are your options

     

    (1) Instead of having your web service return the RDL as its own item, simply have it return two items: the RDL and the serialized dataset or sets that you want have loaded for it.  Then the receiver can pull the datasets out, de-serialize them as I think I have already suggersted, and then load them in the standard fashion, which I think Matt describes.

     

    The one thing you can't do is  "make the report generate with the data included" and then have the server control render the report -- because a local report doesn't handle data at all.  It simply consumes data that has already prepared. So here is your second option:

     

    (2) Process the report completely on the client side, if that is where the report and the data are, and pass the *results* to the application server for display (and apparently for possible printing).  This is what I was suggesting here:

     

    Third: if your tiers communicate with web services, why not construct a web service call that passes back the report as inline HTML or a PDF, why use the reportviewer control client-side at all?

     

    Although you say you have the same problem as Chris, I'm not sure you do, since he wants to render the report locally and you want to render the report on the server.  But either way, what I am suggesting above still applies:  If one tier has both the data and the report, then why not render on that tier and hand the web service the results of the rendering, then send the results of processing to the other tier in the web service. Why send a set of instructions that require processing at all?

     

    >L<

     

    Monday, September 10, 2007 2:49 PM