Report running OK in the Windows Report Designer but cannot execute in winforms
I'm new to fastreports and actually am still evaluating this product as a replacement for SRSS report we currenty have. I converted a basic SRSS report using the Windows Report Designer, and it runs in the designer.
When I want to call this report from a winforms application I have a simple button that does this.
It then gives an error on the Prepare() step.
Since the report runs fine in the Report Designer I am wondering whether some setup needs to be done here that is not directly in the Docs.
P.S. I am running the Opensource version since I am still evaluating the product.
The cells mentioned contains this:
Cell3: [DisplayTimeSSasHHHMM([Results.Inbound_CallSS])]
It looks like it is not processing the function I created and that messes up the entire script processing. I think I might have to register some assembly to execute the script code, but I can't find anything about this.
Can anyone help me get this to work. This product is the closest to SRSS I have found and converting basic reports was not that hard.
Comments
When running this report that has a MSSqlDataConnection in the Windows Report Designer it works fine. But after the .Load() call the Connections and Datasources dictionaries are empty. Is this some limitation with the free/Opensource version? If so, how am I to see whether this product is suitable when I can't test the enite flow.
I also started looking at the demo's and a lot of them seem to RegisterData() calling with data generated elsewhere. But why, most of our reports in SRSS are complete, we just need some paramaters to generate the thing. Why would I create all the queries in the frx and then iat runtime I have to again doe the queries and then use RegisterData.
I must be doing something wrong, please help.
Ok, so I fugred it out myself. In an other support item I saw a suggestion that you run
FastReport.Utils.RegisteredObjects.AddConnection(typeof(MsSqlDataConnection));
before anything. And Yep, now Prepare works and I have connections and I can export the report to html.
Is there anywhere in support or github that I could have found a basic exmaple explaining exactly how to setup running a report. Especially when running MsSQLConections that need to be registered :-|