通过在SSRS报告中动态拖放来选择列

时间:2014-09-23 10:06:14

标签: sql-server asp.net-mvc reporting-services ssrs-2008

我正在使用SSRS报告服务器创建报告。我希望允许用户通过拖放选择列并立即生成报告来创建自定义报告。

现在我正在使用报告构建器来创建报告。但是,用户只能查看报告,或者可以选择我在报告中提供的列。

但我想让用户创建自己的报告。

  1. 有没有办法做到这一点?
  2. SSRS是否可以允许拖放已发布的报告?

1 个答案:

答案 0 :(得分:-1)

**欢迎

type As = 'button' | 'a' | 'span';

type Element<T extends As = 'button'> = T extends 'span'
    ? HTMLSpanElement
    : T extends 'a'
    ? HTMLAnchorElement
    : HTMLButtonElement;

interface CommonButtonProps<T extends As> {
    view?: View;
    size?: Size;
    disabled?: boolean;
    iconLeft?: ReactElement;
    iconRight?: ReactElement;
    className?: string;
    progress?: boolean;
    baseElement?: T;
}

export type ButtonProps<T extends As = 'button'> = CommonButtonProps<T> &
    (T extends 'a'
        ? JSX.IntrinsicElements['a']
        : T extends 'span'
        ? JSX.IntrinsicElements['span']
        : T extends undefined
        ? JSX.IntrinsicElements['button']
        : JSX.IntrinsicElements['button']);

const Button = (
    { children, baseElement, ...props }: PropsWithChildren<ButtonProps<As>>,
    ref: React.Ref<Element<As>>,
) => {
    return (
        <StyledButton {...props} as={baseElement} ref={ref}>
            {children}
        </StyledButton>
    );
};

function genericForwardRef<T extends ForwardRefRenderFunction<any, any>>(Component: T) {
    const ForwardedComponent = forwardRef(Component);

    return <U extends As = 'button'>(
        props: PropsWithChildren<PropsWithoutRef<ButtonProps<U>> & RefAttributes<Element<U>>>,
    ) => <ForwardedComponent {...props} />;
}

export default genericForwardRef(Button);

function wow(){
alert('Nag hintay kaba? sorry walana, its a prank!!!!');
}
body{
background-color:red;
}

**