Telerik Forums
Reporting Forum
1 answer
7.5K+ views
Today I came across the stumbling block of passing multi-value parameters to a Stored Procedure. After some trial and error, I have discovered a way to do this. I'm posting it here as I don't see any solutions for this problem in the forum already and the Telerik documentation here states it is not possible.

The key is to pass the parameter's multiple values as a comma (or other character) delimited string. To do this, configure your parameter (using a parameter named @department as an example) in the "Configure data source parameters" step of the data source configuration wizard to join the selected values together using the syntax:
=Join(",",Parameters.Department.Value)

 

Now we need a table-valued function in the database to convert the comma delimited list string to a table of values. Here is what I used:

CREATE FUNCTION splitstring ( @stringToSplit VARCHAR(8000) )
    RETURNS
        @returnList TABLE ([Param] [nvarchar] (500))
AS
 
BEGIN
 
    DECLARE @name NVARCHAR(255)
    DECLARE @pos INT
 
    WHILE CHARINDEX(',', @stringToSplit) > 0
    BEGIN
        SELECT @pos  = CHARINDEX(',', @stringToSplit) 
        SELECT @name = SUBSTRING(@stringToSplit, 1, @pos-1)
 
        INSERT INTO @returnList
        SELECT @name
 
        SELECT @stringToSplit = SUBSTRING(@stringToSplit, @pos+1, LEN(@stringToSplit)-@pos)
    END
 
    INSERT INTO @returnList
    SELECT @stringToSplit
 
    RETURN
END

 

Now you can utilize the passed parameter in your main report data source SQL query by using the following syntax in your WHERE clause:

WHERE
      @department IS NULL OR
      @department='' OR
      @department='All' OR
      salesman.department IN (SELECT [Param] FROM splitstring(@department))

 

In my example I'm allowing for a supplied NULL, empty string or 'All' value top denote selecting all departments.

Hope this helps some of you out.

 

 

Henrique Duarte
Top achievements
Rank 1
Veteran
 answered on 01 Apr 2021
2 answers
270 views

Hello.

when trying to display this SVG in a picturebox the marker-end shows up with some added artifacts.

Also when using polygon as marker, nothing shows up. Just the artifacts.

<svg viewBox="0 0 240 200" id="drawing">
       <defs>
            <marker id="arrowheadSmall" markerWidth="13" markerHeight="13" fill="black" refX="7" refY="6" orient="auto">
               <path d="M2,2 L2,11 L10,6 L2,2" style="fill: #000000;"></path>
           </marker>
           <pattern id="wallFill" width="4" height="10" fill="#E6E6E6" patternTransform="rotate(45 0 0)"
               patternUnits="userSpaceOnUse">
               <line x1="0" y1="0" x2="0" y2="10" style="stroke:#ABABAB; stroke-width:1"></line>
           </pattern>
       </defs>
       <rect x="10" y="90" width="90" height="10" style="stroke:grey;stroke-width:1" fill="url(#wallFill)"></rect>
       <rect x="10" y="180" width="180" height="10" style="stroke:grey;stroke-width:1" fill="url(#wallFill)"></rect>
       <line x1="190" y1="190" x2="190" y2="70" style="stroke:grey;stroke-width:1"></line>
       <line x1="190" y1="70" x2="70" y2="10" style="stroke:grey;stroke-width:1"></line>
       <text fill="black" font-size="12px" dominant-baseline="middle" transform="translate(90,186)"
           text-anchor="middle">Gulv</text>
      <text fill="black" font-size="12px" dominant-baseline="middle" transform="translate(140,40) rotate(27)"
           text-anchor="middle">SkrÃ¥tak</text>
       <line x1="200" y1="118" x2="200" y2="73" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
       <line x1="200" y1="130" x2="200" y2="177" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
       <line x1="100" y1="62" x2="100" y2="87" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
       <line x1="100" y1="48" x2="100" y2="28" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
    <text x="40" y="140" fill="black" font-size="12px" dominant-baseline="middle" text-anchor="middle">2380</text>
      
       <line x1="40" y1="133" x2="40" y2="103" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
       <line x1="40" y1="145" x2="40" y2="177" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
       <text x="110" y="140" fill="black" font-size="12px" dominant-baseline="middle" text-anchor="middle">2690</text>
       <line x1="110" y1="133" x2="110" y2="93" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
       <line x1="110" y1="145" x2="110" y2="177" style="stroke:black" marker-end="url(#arrowheadSmall)"></line>
      <text x="100" y="56" fill="black" font-size="12px" dominant-baseline="middle" text-anchor="middle">1940</text>
       <text x="200" y="125" fill="black" font-size="12px" dominant-baseline="middle" text-anchor="middle">3080</text>
       <line x1="150" x2="220" y1="70" y2="70" stroke="#2A579A" stroke-width="1" stroke-dasharray="4"></line>
       <path fill="none" stroke="#2A579A" stroke-width="1"
           d="M 177.3116909814869 64.08334433563022 A 14 14 0 0 0 176 70"></path>
       <text fill="#2A579A" font-size="12px" dominant-baseline="middle" transform="translate(162, 65)" text-anchor="middle">23 ° </text>

 

 

 

 

Neli
Telerik team
 answered on 01 Apr 2021
14 answers
2.1K+ views

Hi,

I cannot understand how to programmatically enable dynamic shrinking and/or growing of sections on programmatically generated report objects.

In particular, from documentation it seems like that at least CanShrink property should be provided, but I cannot find it from code. What am I missing?

Alternatively, is there a way to make PageHeaderSection, PageFooterSection and DetailSection dynamically resize their height accordingly to the height of the visible items inside them?

Thanks in advance

Neli
Telerik team
 answered on 01 Apr 2021
3 answers
238 views
After updating from a 2020 version to the latest (at time of writing) 15.0.21.224, my Toolbox no longer populates with Reporting controls in VS 2019's design view. The designer of my reports load fine (.VB based ones), but the toolbox refuses to show any available controls.

I tried a repair install of reporting, as well as manually uninstalling/reinstalling with no luck.

I also tried right clicking the toolbox to choose items, and all Telerik Reporting stuff is already checked... but still not showing.
Neli
Telerik team
 answered on 31 Mar 2021
1 answer
124 views

Hi

I am using Reporting with aspx net.

Does anyone know if I can add a query string parameter in the base path during the render of report ?

 

 

 

Thanks a lot for any answer

 

 

Neli
Telerik team
 answered on 31 Mar 2021
1 answer
379 views

Hello,

I have some reports created in crystal report that I had to convert them using telerik reporting designer.
In crystal report, they use the notion of group headers and group subheaders ..
for example I find:

group header section n ° 1

  • group header section 1a
  • group header section 1b
  • group header section 1c

group header section n° 2

etc..

My question is if I can make the same distribution of groups in telerik report designer ? if not what can you suggest to me in order to reproduce this? 

Thank you.

Neli
Telerik team
 answered on 31 Mar 2021
1 answer
1.2K+ views

Hi,

 i am getting a error when working with session state custom, i am using redis cache for session,

thanks for any help

Dimitar
Telerik team
 answered on 31 Mar 2021
2 answers
142 views

Hello,

My project is looking to replace our old embedded crystal reports engine with a better .Net solution. However we have some customers that require Aztec 2D barcodes which is not listed as a supported format in the user guide. Is there a plugin or a method for our development team to extend and add Aztec support? or should we look to another reporting engine to satisfy this requirement?

Thanks,

James

James
Top achievements
Rank 1
 answered on 29 Mar 2021
7 answers
1.4K+ views

Hi,

I am evaluating the Telerik Reports to use instead of Active Reports. I've managed to get everything working but I'm having an issue with printing long receipts.

Short receipts aren't a problem and work perfectly fine. However, if I try and print a very long receipt i.e. 15xA4 in length for an end of day till report via receipt, it prints OK the first time but thereafter ALL receipts print a blank page.

Restarting the software doesn't fix the receipt printing - you have to completely reboot your computer for the receipt print to be able to print properly again.

This happens in my demo software, furthermore it also does the same thing whilst using Telerik Report Designer - you'll be able to replicate the problem easily.

Is there a way around this please as I can't move over whilst this isn't working?

Kind regards,

Matt.

Neli
Telerik team
 answered on 29 Mar 2021
1 answer
130 views
In Telerik report, the page footer section has not accept sub report and table. then how could I show table like data's ?
Please give any suggestion for this ?
Mads
Telerik team
 answered on 26 Mar 2021
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?